home *** CD-ROM | disk | FTP | other *** search
/ IRIX Base Documentation 2002 November / SGI IRIX Base Documentation 2002 November.iso / usr / share / catman / p_man / cat3x / curs_initscr.z / curs_initscr
Encoding:
Text File  |  2002-10-03  |  9.3 KB  |  130 lines

  1.  
  2.  
  3.  
  4. ccccuuuurrrrssss____iiiinnnniiiittttssssccccrrrr((((3333XXXX))))                                              ccccuuuurrrrssss____iiiinnnniiiittttssssccccrrrr((((3333XXXX))))
  5.  
  6.  
  7.  
  8. NNNNAAAAMMMMEEEE
  9.      _cccc_uuuu_rrrr_ssss______iiii_nnnn_iiii_tttt_ssss_cccc_rrrr:  _iiii_nnnn_iiii_tttt_ssss_cccc_rrrr, _nnnn_eeee_wwww_tttt_eeee_rrrr_mmmm, _eeee_nnnn_dddd_wwww_iiii_nnnn, _iiii_ssss_eeee_nnnn_dddd_wwww_iiii_nnnn, _ssss_eeee_tttt______tttt_eeee_rrrr_mmmm, _dddd_eeee_llll_ssss_cccc_rrrr_eeee_eeee_nnnn -
  10.      _cccc_uuuu_rrrr_ssss_eeee_ssss screen initialization and manipulation routines
  11.  
  12. SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
  13.      _####_iiii_nnnn_cccc_llll_uuuu_dddd_eeee _<<<<_cccc_uuuu_rrrr_ssss_eeee_ssss_...._hhhh_>>>>
  14.  
  15.      _WWWW_IIII_NNNN_DDDD_OOOO_WWWW _****_iiii_nnnn_iiii_tttt_ssss_cccc_rrrr_((((_vvvv_oooo_iiii_dddd_))))_;;;;
  16.      _iiii_nnnn_tttt _eeee_nnnn_dddd_wwww_iiii_nnnn_((((_vvvv_oooo_iiii_dddd_))))_;;;;
  17.      _iiii_nnnn_tttt _iiii_ssss_eeee_nnnn_dddd_wwww_iiii_nnnn_((((_vvvv_oooo_iiii_dddd_))))_;;;;
  18.      _SSSS_CCCC_RRRR_EEEE_EEEE_NNNN _****_nnnn_eeee_wwww_tttt_eeee_rrrr_mmmm_((((_cccc_hhhh_aaaa_rrrr _****_tttt_yyyy_pppp_eeee_,,,, _FFFF_IIII_LLLL_EEEE _****_oooo_uuuu_tttt_ffff_dddd_,,,, _FFFF_IIII_LLLL_EEEE _****_iiii_nnnn_ffff_dddd_))))_;;;;
  19.      _SSSS_CCCC_RRRR_EEEE_EEEE_NNNN _****_ssss_eeee_tttt______tttt_eeee_rrrr_mmmm_((((_SSSS_CCCC_RRRR_EEEE_EEEE_NNNN _****_nnnn_eeee_wwww_))))_;;;;
  20.      _vvvv_oooo_iiii_dddd _dddd_eeee_llll_ssss_cccc_rrrr_eeee_eeee_nnnn_((((_SSSS_CCCC_RRRR_EEEE_EEEE_NNNN_**** _ssss_pppp_))))_;;;;
  21.  
  22. DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
  23.      _iiii_nnnn_iiii_tttt_ssss_cccc_rrrr is almost always the first routine that should be called (the
  24.      exceptions are _ssss_llll_kkkk______iiii_nnnn_iiii_tttt, _ffff_iiii_llll_tttt_eeee_rrrr, _rrrr_iiii_pppp_oooo_ffff_ffff_llll_iiii_nnnn_eeee, _uuuu_ssss_eeee______eeee_nnnn_vvvv and, for multiple-
  25.      terminal applications, _nnnn_eeee_wwww_tttt_eeee_rrrr_mmmm.)  This determines the terminal type and
  26.      initializes all _cccc_uuuu_rrrr_ssss_eeee_ssss data structures.  _iiii_nnnn_iiii_tttt_ssss_cccc_rrrr also causes the first
  27.      call to _rrrr_eeee_ffff_rrrr_eeee_ssss_hhhh to clear the screen.  If errors occur, _iiii_nnnn_iiii_tttt_ssss_cccc_rrrr writes an
  28.      appropriate error message to standard error and exits; otherwise, a
  29.      pointer is returned to _ssss_tttt_dddd_ssss_cccc_rrrr.  If the program needs an indication of
  30.      error conditions, _nnnn_eeee_wwww_tttt_eeee_rrrr_mmmm_((((_)))) should be used instead of _iiii_nnnn_iiii_tttt_ssss_cccc_rrrr; _iiii_nnnn_iiii_tttt_ssss_cccc_rrrr
  31.      should only be called once per application.
  32.  
  33.      A program that outputs to more than one terminal should use the _nnnn_eeee_wwww_tttt_eeee_rrrr_mmmm
  34.      routine for each terminal instead of _iiii_nnnn_iiii_tttt_ssss_cccc_rrrr.  A program that needs an
  35.      indication of error conditions, so it can continue to run in a line-
  36.      oriented mode if the terminal cannot support a screen-oriented program,
  37.      would also use this routine.  The routine _nnnn_eeee_wwww_tttt_eeee_rrrr_mmmm should be called once
  38.      for each terminal.  It returns a variable of type _SSSS_CCCC_RRRR_EEEE_EEEE_NNNN _**** which should
  39.      be saved as a reference to that terminal.  The arguments are the _t_y_p_e of
  40.      the terminal to be used in place of _$$$$_TTTT_EEEE_RRRR_MMMM, a file pointer for output to
  41.      the terminal, and another file pointer for input from the terminal (if
  42.      _t_y_p_e is _NNNN_UUUU_LLLL_LLLL, _$$$$_TTTT_EEEE_RRRR_MMMM will be used).  The program must also call _eeee_nnnn_dddd_wwww_iiii_nnnn for
  43.      each terminal being used before exiting from curses.  If _nnnn_eeee_wwww_tttt_eeee_rrrr_mmmm is
  44.      called more than once for the same terminal, the first terminal referred
  45.      to must be the last one for which _eeee_nnnn_dddd_wwww_iiii_nnnn is called.
  46.  
  47.      A program should always call _eeee_nnnn_dddd_wwww_iiii_nnnn before exiting or escaping from
  48.      _cccc_uuuu_rrrr_ssss_eeee_ssss mode temporarily.  This routine restores tty modes, moves the
  49.      cursor to the lower left-hand corner of the screen and resets the
  50.      terminal into the proper non-visual mode.  Calling _rrrr_eeee_ffff_rrrr_eeee_ssss_hhhh or _dddd_oooo_uuuu_pppp_dddd_aaaa_tttt_eeee
  51.      after a temporary escape causes the program to resume visual mode.
  52.  
  53.      The _iiii_ssss_eeee_nnnn_dddd_wwww_iiii_nnnn routine returns _TTTT_RRRR_UUUU_EEEE if _eeee_nnnn_dddd_wwww_iiii_nnnn has been called without any
  54.      subsequent calls to _wwww_rrrr_eeee_ffff_rrrr_eeee_ssss_hhhh, and _FFFF_AAAA_LLLL_SSSS_EEEE otherwise.
  55.  
  56.  
  57.  
  58.  
  59.                                                                         PPPPaaaaggggeeee 1111
  60.  
  61.  
  62.  
  63.  
  64.  
  65.  
  66. ccccuuuurrrrssss____iiiinnnniiiittttssssccccrrrr((((3333XXXX))))                                              ccccuuuurrrrssss____iiiinnnniiiittttssssccccrrrr((((3333XXXX))))
  67.  
  68.  
  69.  
  70.      The _ssss_eeee_tttt______tttt_eeee_rrrr_mmmm routine is used to switch between different terminals.  The
  71.      screen reference _nnnn_eeee_wwww becomes the new current terminal.  The previous
  72.      terminal is returned by the routine.  This is the only routine which
  73.      manipulates _SSSS_CCCC_RRRR_EEEE_EEEE_NNNN pointers; all other routines affect only the current
  74.      terminal.
  75.  
  76.      The _dddd_eeee_llll_ssss_cccc_rrrr_eeee_eeee_nnnn routine frees storage associated with the _SSSS_CCCC_RRRR_EEEE_EEEE_NNNN data
  77.      structure.  The _eeee_nnnn_dddd_wwww_iiii_nnnn routine does not do this, so _dddd_eeee_llll_ssss_cccc_rrrr_eeee_eeee_nnnn should be
  78.      called after _eeee_nnnn_dddd_wwww_iiii_nnnn if a particular _SSSS_CCCC_RRRR_EEEE_EEEE_NNNN is no longer needed.
  79.  
  80. RRRREEEETTTTUUUURRRRNNNN VVVVAAAALLLLUUUUEEEE
  81.      _eeee_nnnn_dddd_wwww_iiii_nnnn returns the integer _EEEE_RRRR_RRRR upon failure and _OOOO_KKKK upon successful
  82.      completion.
  83.  
  84.      Routines that return pointers always return _NNNN_UUUU_LLLL_LLLL on error.
  85.  
  86. NNNNOOOOTTTTEEEESSSS
  87.      The header file _<<<<_cccc_uuuu_rrrr_ssss_eeee_ssss_...._hhhh_>>>> automatically includes the header files
  88.      _<<<<_ssss_tttt_dddd_iiii_oooo_...._hhhh_>>>> and _<<<<_uuuu_nnnn_cccc_tttt_rrrr_llll_...._hhhh_>>>>.
  89.  
  90.      Note that _iiii_nnnn_iiii_tttt_ssss_cccc_rrrr and _nnnn_eeee_wwww_tttt_eeee_rrrr_mmmm may be macros.
  91.  
  92. SSSSEEEEEEEE AAAALLLLSSSSOOOO
  93.      _cccc_uuuu_rrrr_ssss_eeee_ssss(3X), _cccc_uuuu_rrrr_ssss______kkkk_eeee_rrrr_nnnn_eeee_llll(3X), _cccc_uuuu_rrrr_ssss______rrrr_eeee_ffff_rrrr_eeee_ssss_hhhh(3X), _cccc_uuuu_rrrr_ssss______ssss_llll_kkkk(3X),
  94.      _cccc_uuuu_rrrr_ssss______uuuu_tttt_iiii_llll(3X)
  95.  
  96.  
  97.  
  98.  
  99.  
  100.  
  101.  
  102.  
  103.  
  104.  
  105.  
  106.  
  107.  
  108.  
  109.  
  110.  
  111.  
  112.  
  113.  
  114.  
  115.  
  116.  
  117.  
  118.  
  119.  
  120.  
  121.  
  122.  
  123.  
  124.  
  125.                                                                         PPPPaaaaggggeeee 2222
  126.  
  127.  
  128.  
  129.